Skip to content

Instantly share code, notes, and snippets.

@Ultrabenosaurus
Ultrabenosaurus / standard_ebooks_opds_downloader.py
Last active May 9, 2024 21:10 — forked from AnalogJ/download_opds.py
Download all ebooks from the Standard eBooks OPDS catalogue, organised into subfolders by author and book title.
#####
#
# Download all of the Standard eBooks catalogue from their OPDS feed.
#
# https://standardebooks.org/
#
# Modified to download all files for each book except the SVG cover and to
# organise the files in subfolders by Author > Book Title.
# The original script downloads only the EPUB file for each book into the
# working directory with no subfolders.
@justinwalz
justinwalz / .tmux.conf
Last active May 9, 2024 21:09
basic tmux conf
# allow reload of this file with PRE r
bind r source-file ~/.tmux.conf \; display "Reloaded."
# switch prefix to control-a, unmap b, allow double-a to go through
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# -r repeat time (Default 500 millis)
set -g repeat-time 2000
@felippe-regazio
felippe-regazio / tt-seek-and-destroy.js
Last active May 9, 2024 21:08
Automatically unfollow Twitter users by a given criteria
/**
* ABOUT
*
* This is a Twitter NO-API/Dependency-Free follower sniffer and auto-blocker.
*
* This function performs automatic bulk blocking with NO-API
* and NO-external-dependencies to run. You must run this snippet
* directly on your Console, it will sniff your followers list
* search for previous given keywords, if found on username or description,
* the user will be automatically blocked.
@mjbalcueva
mjbalcueva / calendar.tsx
Last active May 9, 2024 21:08
shadcn ui calendar custom year and month dropdown
"use client"
import * as React from "react"
import { buttonVariants } from "@/components/ui/button"
import { ScrollArea } from "@/components/ui/scroll-area"
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
import { cn } from "@/lib/utils"
import { ChevronLeft, ChevronRight } from "lucide-react"
import { DayPicker, DropdownProps } from "react-day-picker"
@going-digital
going-digital / math.wasm
Last active May 9, 2024 21:07
WebAssembly native sin, log and exp functions optimised for code size.
;; Native implementations of sin, log and exp functions.
;; sintau: 41 bytes code, 34 bytes shared code, 24 bytes data
;; exp2: 25 bytes code, 34 bytes shared code, 20 bytes data
;; log2: 37 bytes code, 34 bytes shared code, 24 bytes data
;; Total 137 bytes code, 68 bytes data
;; Wasm-opt -Oz tries to optimise out $half by converting to f32.consts, but that actually takes up more space, not less.
;; Polynomial coefficients calculated by accompanying python script.
;; call $evalpoly parameters will need to be manually changed for different length polynomials.
@taskylizard
taskylizard / fmhy.md
Last active May 9, 2024 21:06
/r/freemediaheckyeah, in one single file (view raw)
@chrismccord
chrismccord / dev.exs
Created May 8, 2024 20:06
Live Reload LiveView notify
config :wps, WPSWeb.Endpoint,
live_reload: [
notify: [
live_view: [
~r"lib/wps_web/core_components.ex$",
~r"lib/wps_web/(live|components)/.*(ex|heex)$"
]
],
patterns: [
~r"priv/static/(?!uploads/).*(js|css|png|jpeg|jpg|gif|svg)$",
@zachrank
zachrank / wsl2-zsh-powerlevel10k.md
Created August 8, 2022 01:43
WSL 2 + Windows Terminal + Oh My Zsh + Powerlevel10k

WSL 2 + Windows Terminal + Oh My Zsh + Powerlevel10k

wsl2-zsh-powerlevel10k

This gist takes heavy inspiration from kevin-smets / iterm2-solarized.md gist for iTerm2.

Windows Subsystem for Linux 2 (WSL 2)

The first thing that you will want to do is install WSL 2 and a Linux distro.

@Gabriel-Chen
Gabriel-Chen / csv-remove-accent.py
Created June 24, 2018 06:06
Remove All Accent on Letters in a CSV File
# This gist is initially used for analysing data in Spanish
import unidecode
import csv
def remove_accent (feed):
csv_f = open(feed, encoding='latin-1', mode='r')
csv_str = csv_f.read()
csv_str_removed_accent = unidecode.unidecode(csv_str)
csv_f.close()